home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18309 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  6.0 KB

  1. Path: symiserver2.symantec.com!NewsWatcher!user
  2. From: wiverson@bedford.symantec.com (Sym Will Iverson)
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.sys.mac.oop.misc,comp.lang.basic.visual.misc,comp.sys.mac.programmer.misc,comp.windows.misc
  4. Subject: Re: java vs. multi-platf. frameworks ?
  5. Date: Fri, 19 Apr 1996 13:47:47 +0100
  6. Organization: Symantec
  7. Message-ID: <wiverson-1904961347470001@155.64.35.130>
  8. References: <3171A3EA.3F27@dma.epfl.ch> <Dq0rq5.9sz@unify.com>
  9. NNTP-Posting-Host: 155.64.35.130
  10. X-Newsreader: Yet Another NewsWatcher 2.2.0b4
  11.  
  12.  
  13. I love these sorts of discussions - take this not as an official policy
  14. statement from Symantec, but rather "Will's ramblings..."
  15.  
  16. In article <Dq0rq5.9sz@unify.com>, lee@Unify.com (Lee Crocker) wrote:
  17.  
  18. > Sun's current attitude about AWT offers little hope.  They seem to
  19. > think that they can achieve portability by making AWT a subset of the
  20. > functionality of existing GUIs; but that attitude is backwards.  To be
  21. > truly portable, it must be a superset of existing GUIs, emulating those
  22. > functions specific to each on the others in a portable way, and letting
  23. > developers query the system for its capabilities in a portable way.
  24.  
  25. Well, I completely disagree.  ;)
  26.  
  27. There was a certain project some time ago which attempted to pull off
  28. exactly what you're describing.  It was called Bedrock, and more money
  29. than you can possibly imagine was blown on it (this was before my time -
  30. it has since metamorphed into ODF).  The scope of what you're talking
  31. about is *massive*.  
  32.  
  33. Consider for a moment that the Mac has QuickDraw GX, drag & drop between
  34. applications, QuickDraw3D, QuickTime, Open Transport (AppleTalk & TCP/IP),
  35. Apple Guide, AppleScript/AppleEvents, OpenDoc, etc, etc, etc.  To do a Mac
  36. app "right" and retain full crossplatform compatibility, you'd have to
  37. implement all of these technologies on Windows.  You'd never ship such a
  38. framework.
  39.  
  40. There is no reason that a developer couldn't build an application with
  41. Java which checked at runtime what kind of machine it ran on and did
  42. conditional branching depending on the results.  The Java application (you
  43. probably wouldn't want to do this with an applet) could load native
  44. libraries and make native system calls.
  45.  
  46. > There is never any excuse to sacrifice functionality for portability.
  47. > Ever.  Users demand--and rightly so--that they be able to take full
  48. > advantage of every dollar they've spent on their hardware and software,
  49. > and if they hear "well, we could do that but it wouldn't be portable"
  50. > from a vendor, they'll go to a vendor that will do it non-portably.
  51.  
  52. You're thinking in terms of commercial shrinkwrapped software.  The
  53. current implementation of the AWT is quite adequate for Web page applets
  54. (the primary attraction) and inhouse custom application development (most
  55. likely deployed as client apps via the web).  I'll gloss over
  56. nontraditional boxes such as the Pippin or Newton.
  57.  
  58. As a reallife example of this, I wrote a small application for internal
  59. use to generate UserIDs and passwords for our secure server.  It's just a
  60. small console app.  I used to build two versions, a Mac version and a PC
  61. version.  From the high level language perspective, there's absolutely no
  62. reason for having to build two versions - this app doesn't do *anything*
  63. that really requires multiple builds beyond the simple incompatibility of
  64. the x86 and the 680x0.  With Java, I just build it once and can post it to
  65. a web server behind the firewall.
  66.  
  67. As an aside, before Java, this would be a classic argument against having
  68. Macs (or Windows boxes or Unix boxes, depending on where you stand) in
  69. your group - too much work to support muliple platforms.  With Java, I can
  70. use my Mac, you can use your Windows box, and the guy down the hall can
  71. use his Linux box.
  72.  
  73. > The only way to ensure portability, therefore, is the ensure that a
  74. > portable program is capable of doing everything the software needs 
  75. > to do, and AWT doesn't even come close.  The glaring omissions for
  76. > me are things like right-button popup menus, native video support
  77. > (for example, being able to query the system for its color capabilities
  78. > and things like monitor gamma, and then optimizing my diplay for it),
  79. > portable virtual keys for things like arrow and cut/paste, better
  80. > font metrics, and about 1000 more system properties.
  81.  
  82. Actually, you can check for right mouse button clicks (see snippet below).
  83.  
  84. The other "glaring omission" is exactly what I was referring to earlier. 
  85. I would hazard that less than one in a hundred developers are going to
  86. care about the monitor gamma for display optimization.  Is this something
  87. that is really *vital* to be in a crossplatform framework?  In a word,
  88. NO.  If your application requires this sort of detail, develop a native
  89. interface and hook into that.
  90.  
  91. The next year will be defined not just by which OS is superior, but which
  92. has the best implementation of Java.  I wouldn't be suprised to see future
  93. OS reviews include Java benchmarks.  The nirvana we are shooting for is to
  94. let each user select the OS they prefer (for OS specific features and
  95. applications), but to not be hampered by a lack of the mundane apps they
  96. are required to use.
  97.  
  98. My 2 cents.
  99.  
  100. -Will
  101.  
  102.  
  103. from D'Arcy Smith, one of our Java engineers...
  104.  
  105. /*** Begin snippet ***/
  106. //    the following was "stolen" off of DejaNews... (sorry don't know who to 
  107. //     give credit to):
  108.      
  109. //      This is how I distinguish mouse button clicks:
  110.      
  111.       public boolean handleEvent(Event evt) {
  112.      
  113.         switch(evt.id) {
  114.      
  115.       case Event.MOUSE_DOWN:
  116.        if (evt.modifiers == evt.CTRL_MASK) {
  117.         System.out.println("Right button pressed");
  118.        } else {
  119.         if (evt.modifiers == evt.ALT_MASK) {
  120.          System.out.println("Middle btn pressed");
  121.         } else {
  122.          System.out.println("Left button pressed");
  123.         }
  124.        }
  125.        return true;
  126.       }
  127.          }
  128.           return super.handleEvent(evt);
  129.      }
  130. /*** End snippet ***/
  131.  
  132. ---
  133. Will Iverson,  Symantec Corporation
  134. Macintosh Developer Relations - wiverson@bedford.symantec.com
  135. As Will Rogers would have said, "There is no such thing as a free variable"
  136.